export default function Child({count, setCount}) {
  return (
    <>
      <p>count: {count}</p>
      <button onClick={() => setCount(val => val + 1)}>更新父组件的count</button>
    </>
  )
}

/* 
setXxx函数的使用
setXxx(newValue)
setXxx(val => newValue)
*/